﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Customers.master" AutoEventWireup="true" CodeFile="TimKiem.aspx.cs" Inherits="TimKiem" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DataList ID="DataList2" runat="server" DataKeyField="TenSP" DataSourceID="AccessDataSource1" RepeatColumns="4" RepeatDirection="Horizontal">
        <ItemTemplate>
        <div class="dtList">
            <a href="ChiTietSanPham.aspx?TenSP=<%# Eval("TenSP") %>">
            <asp:Image ID="Image7" runat="server" Height="190px" 
                ImageUrl='<%# Eval("Hinh", "{0}") %>' Width="190px" /></a>
            <br />
            <asp:Label ID="TenSPLabel" runat="server" Text='<%# Eval("TenSP") %>' 
                ForeColor="#0066FF" Font-Bold="True" CssClass="tenSP" />
            <br />
            <asp:Label ID="HangSXLabel" runat="server" Text='<%# Eval("HangSX") %>' Font-Bold="true" />
            <br />
            <asp:Label ID="TinhTrangLabel" runat="server" Text='<%# Eval("TinhTrang") %>'  ForeColor="Gray" Font-Size="12px"/>
            <br />
            <br />
            <asp:Label ID="GiaLabel" runat="server" Text='<%# Eval("Gia") %>' ForeColor="Red" Font-Size="12px"/> &nbsp VND
            <br />            
            <br />
            <asp:Label ID="LikeLabel" runat="server" Text='<%# Eval("LikeSanPham") %>'  ForeColor="#04AEDA" Font-Bold="true"/>
            <img src="images/Like.png" height="15px" width="15px" style="vertical-align:bottom" />
            &nbsp;&nbsp;&nbsp;&nbsp;            
            <asp:Label ID="Xemlabel" runat="server" Text='<%# Eval("XemSanPham") %>' ForeColor="#04AEDA" Font-Bold="true" />
            <img src="images/Viewers.png" height="15px" width="15px" style="vertical-align:bottom" />
            <br /> 
        </div>
        </ItemTemplate>
    </asp:DataList>
    <asp:AccessDataSource ID="AccessDataSource1" runat="server"
        DataFile="~/App_Data/Data.mdb"
        SelectCommand="SELECT TenSP, HangSX, Gia, TinhTrang, Hinh, LikeSanPham, XemSanPham FROM SanPham WHERE (TenSP LIKE ?) AND (KN <> - 1)">
        <SelectParameters>
            <asp:QueryStringParameter Name="TenSP" QueryStringField="TenSP" Type="String" />
        </SelectParameters>
    </asp:AccessDataSource>
</asp:Content>

